﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Header.ascx.cs" Inherits="ElectronicSelling.UserControl.Header" %>
<%@ Register Src="~/UserControl/LoginAndRegister.ascx" TagPrefix="uc" TagName="LoginAndRegister" %>

<script>
    $(document).ready(function () {
        $(".pop_content").hide();
        //openPopupLogin();
        $(".send_order").click(function (e) {
            openPopupLogin();
        });

        $(".close").click(function (e) {
            closePopupLogin();
            e.preventDefault();
        });
        $("#wallpaper").click(function () {
            closePopupLogin();
        });
    });
</script>
<header>
    <div class="top_head">
        <% if (Session["UserName"] == null)
           { %>
        <a class="send_order">Đăng nhập</a>
        &nbsp;&nbsp;|&nbsp;&nbsp;
		<a class="send_order">Đăng ký</a>&nbsp;&nbsp;|&nbsp;&nbsp;
        <%}
           else
           { %>
        <asp:LinkButton ID="lnkLogout" runat="server" OnClientClick="return confirm('Bạn thực sự muốn thoát?')" OnClick="lnkLogout_Click" >Thoát</asp:LinkButton>&nbsp;&nbsp;|&nbsp;&nbsp;
        <a href="../CustomerManage.aspx">Thông tin tài khoản</a>&nbsp;&nbsp;|&nbsp;&nbsp;
        <%} %>
        <a href="Cart.aspx">Giỏ hàng của bạn (<% Response.Write(NumberOfCartItem()); %>)</a>
    </div>
    <div id="logo"></div>
    <div class="search">
        <asp:Button ID="btnSearch" runat="server" CssClass="transparent" OnClick="btnSearch_Click"  />
        <asp:TextBox ID="txtSearch" CssClass="search_input" placeholder="Tìm tất cả tại đây" runat="server"></asp:TextBox>
<%--        <input type="text" name="txtSearch" class="search_input" placeholder="Tìm tất cả tại đây" />--%>
    </div>
    <% if (Session["UserName"] != null)
       { %>
    <div class="info_customer">
        <h4>Chào bạn
                <span><a href=""><%Response.Write(Session["UserName"].ToString()); %></a></span>
        </h4>
    </div>
    <%} %>
    <div class="clear"></div>
</header>
<div id="login_register" class="pop_content">
    <uc:LoginAndRegister runat="server" ID="LoginAndRegister" />
</div>
<div id="wallpaper"></div>

